<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <div th:replace="fragments/main :: head (title = 'Module ' + ${module.name})"></div>
</head>
<body>

<div th:replace="fragments/main :: header
    (title = 'Module ' + ${module.name},
    description = '')"></div>

<div class="container">

    <dl class="row">
        <dt class="col-3">Module Name</dt>
        <dd class="col-9" th:text="${module.name}">NAME</dd>
        <dt class="col-3">Storage Prefix</dt>
        <dd class="col-9" th:text="${module.storage.prefix}">NAME</dd>
    </dl>

    <div class="row">
        <div class="col-12" th:if="${!#lists.isEmpty(module.storage.entries)}">
            <h1>Storage</h1>
            <div th:each="item, pos: ${module.storage.entries}" class="row">
                <div class="col-10">
                    <h4>
                        <a class=""
                           th:href="'/module/' + ${moduleId} + '/entry/' + ${pos.index}">
                            <span th:text="${item.name}">NAME</span>
                        </a>
                    </h4>
                </div>
            </div>
        </div>

        <div class="col-12" th:if="${!#lists.isEmpty(module.calls)}">
            <h1>Calls</h1>
            <div th:each="item, pos: ${module.calls}" class="row">
                <div class="col-10">
                    <h4>
                        <a class=""
                           th:href="'/module/' + ${moduleId} + '/call/' + ${pos.index}">
                            <span th:text="${item.name}">NAME</span>
                        </a>
                    </h4>
                </div>
            </div>
        </div>

        <div class="col-12" th:if="${!#lists.isEmpty(module.events)}">
            <h1>Events</h1>
            <div th:each="item, pos: ${module.events}" class="row">
                <div class="col-10">
                    <h4>
                        <a class=""
                           th:href="'/module/' + ${moduleId} + '/event/' + ${pos.index}">
                            <span th:text="${item.name}">NAME</span>
                        </a>
                    </h4>
                </div>
            </div>
        </div>

        <div class="col-12" th:if="${!#lists.isEmpty(module.errors)}">
            <h1>Errors</h1>
            <div th:each="item, pos: ${module.errors}" class="row">
                <div class="col-10">
                    <h4>
                        <a class=""
                           th:href="'/module/' + ${moduleId} + '/error/' + ${pos.index}">
                            <span th:text="${item.name}">NAME</span>
                        </a>
                    </h4>
                </div>
            </div>
        </div>

        <div class="col-12" th:if="${!#lists.isEmpty(module.constants)}">
            <h1>Constants</h1>
            <div th:each="item, pos: ${module.constants}" class="row">
                <div class="col-10">
                    <h4>
                        <a class=""
                           th:href="'/module/' + ${moduleId} + '/constant/' + ${pos.index}">
                            <span th:text="${item.name}">NAME</span>
                        </a>
                    </h4>
                </div>
            </div>
        </div>
    </div>
</div>

<div th:replace="fragments/main :: footer"></div>

</body>
</html>